import time

class Log:
    def __init__(self):
        self.fp_sys = open('sys.log', 'a+', encoding='utf-8')
        self.fp_msg = open('msg.log', 'a+', encoding='utf-8')
        
    def sys(self, msg):
        print(msg)
        self.fp_sys.write('%s %s\n'%(time.asctime(time.localtime(time.time())), msg))
        self.fp_sys.flush()

    def msg(self, fr, msg):
        self.fp_msg.write('%s %s:%s\n'%(time.asctime(time.localtime(time.time())), fr, msg))
        self.fp_msg.flush()